﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuanLyNhanVien.DataAccessLayer;

namespace QuanLyNhanVien.BusinessLogicLayer
{
    class PhongBanCTL
    {
        private PhongBanDTO info = new PhongBanDTO();
        private PhongBanDAO data = new PhongBanDAO();

        public PhongBanDTO PhongBan
        {
            get
            {
                return info;
            }
            set
            {
                info = value;
            }
        }

        public bool insert()
        {
            return data.ThemPhongBan(info);
        }

        public bool delete()
        {
            return data.XoaPhongBan(info.MAPHG);
        }

        public bool update()
        {
            return data.SuaPhongBan(info);
        }

        public List<PhongBanDTO> getDsPhongBan()
        {
            return data.LayDanhSachPhongBan();
        }

        public List<string> GetColName()
        {
            return data.GetColName();
        }
    }
}
